Imports System.ComponentModel

<Serializable()> _
Public Class Section7
    Inherits BaseDescriptor

    <Serializable(), TypeConverter(GetType(CustomExpandableObjectConverter))> _
    Public Class SectionVFLUX
        Inherits BaseDescriptor

        Private _LAMBDA As Double
        Private _FLUX_1 As Double
        Private _IFLUX As Integer = 1
        Private _FILTER As Double
        Private _FLUX_2 As Double

        <Browsable(False)> _
        Public Property LAMBDA() As Double
            Get
                Return _LAMBDA
            End Get
            Set(ByVal value As Double)
                _LAMBDA = value
            End Set
        End Property

        <CustomOrder(1), CustomDisplayName("FLUX_1"), CustomDescription("FLUX_1"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
        Public Property FLUX_1() As Double
            Get
                Return _FLUX_1
            End Get
            Set(ByVal value As Double)
                _FLUX_1 = value
            End Set
        End Property

        <CustomOrder(2), CustomDisplayName("IFLUX"), CustomDescription("IFLUX"), DefaultValue(1), TypeConverter(GetType(CustomInt32ConverterIFLUX))> _
        Public Property IFLUX() As Object
            Get
                Return _IFLUX
            End Get
            Set(ByVal value As Object)
                _IFLUX = CInt((New CustomInt32ConverterIFLUX).ConvertFrom(value))
            End Set
        End Property

        <CustomOrder(3), CustomDisplayName("FILTER"), CustomDescription("FILTER"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
        Public Property FILTER() As Double
            Get
                Return _FILTER
            End Get
            Set(ByVal value As Double)
                _FILTER = value
            End Set
        End Property

        <CustomOrder(4), CustomDisplayName("FLUX_2"), CustomDescription("FLUX_2"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
        Public Property FLUX_2() As Double
            Get
                Return _FLUX_2
            End Get
            Set(ByVal value As Double)
                _FLUX_2 = value
            End Set
        End Property

    End Class

    'S7C
    Private _VFLUX As New List(Of SectionVFLUX)

    <CustomCategory("S7C"), CustomDisplayName("VFLUX"), CustomDescription("VFLUX"), TypeConverter(GetType(CustomArrayConverter)), [ReadOnly](True)> _
    Public Property VFLUX() As SectionVFLUX()
        Get
            Return Me.Items.ToArray
        End Get
        Set(ByVal value As SectionVFLUX())
            Me.Items.Clear()
            For Each objSectionVFLUX As SectionVFLUX In value
                Me.Items.Add(objSectionVFLUX)
            Next
        End Set
    End Property

    <Browsable(False)> _
    Public ReadOnly Property Items() As List(Of SectionVFLUX)
        Get
            Return _VFLUX
        End Get
    End Property

End Class
